const app = getApp(); //引入导航

var util = require('../../utils/common.js'); //引入公共JS


import { YcCollect } from 'myCollect.model.js';
var yccollect = new YcCollect();
Page({
  data: {
    showIcon: true //显示返回键以及首页

  },
  onLoad: function (options) {
    //收藏详情页列表
    yccollect.getShouCangrow(data => {
      this.setData({
        'ShouCang': data
      });
    });
  },
  //分享
  onShareAppMessage: function () {
    util.sharePage();
  },
  //删除演出
  ycdelete: function (e) {
    var aid = e.target.dataset.aid;
    this.data.aid = aid;
    var that = this;
    tt.showModal({
      title: '提示',
      content: '确定要删除吗？',
      success: function (sm) {
        if (sm.confirm) {
          //收藏详情页列表
          yccollect.getDeleteFunt(aid, data => {
            that.onLoad();
          });
        }
      }
    });
  }
});